﻿using System.Collections.Generic;

namespace Protocol.SouthGridProtocol.Blocks
{
    /// <summary>
    /// 报文内容
    /// </summary>
    public class CData
    {
        /// <summary>
        /// di 2 byte（低在前高在后）
        /// </summary>
        public string da { get; set; }//
        /// <summary>
        /// da 4 byte（低在前高在后）
        /// </summary>
        public string di { get; set; }//
        /// <summary>
        /// 数据域（低在前高在后）
        /// </summary>
        public string data { get; set; }//data
        public string toString()
        {
            return da + di + data;
        }
    }
    public class C0EHData
    {
        /// <summary>
        /// di 2 byte
        /// </summary>
        public string da { get; set; }//
        /// <summary>
        /// da 4 byte
        /// </summary>
        public string di { get; set; }//

        /// <summary>
        /// 起始时间，6 byte
        /// </summary>
        public string beginTime { get; set; }//
        /// <summary>
        /// 结束时间，6 byte
        /// </summary>
        public string endTime { get; set; }
    }


    public class C13HData
    {
        /// <summary>
        /// di 2 byte
        /// </summary>
        public string da { get; set; }//
        /// <summary>
        /// da 4 byte
        /// </summary>
        public string di { get; set; }//

        /// <summary>
        /// 起始时间，6 byte
        /// </summary>
        public string beginTime { get; set; }//
        /// <summary>
        /// 结束时间，6 byte
        /// </summary>
        public string endTime { get; set; }
    }


    /// <summary>
    /// 带起始和结束时间的单块数据域格式
    /// </summary>
    public class CDataWithTimeDownLine
    {
        /// <summary>
        /// di 2 byte
        /// </summary>
        public string da { get; set; }//
        /// <summary>
        /// da 4 byte
        /// </summary>
        public string di { get; set; }//

        /// <summary>
        /// 起始时间，6 byte
        /// </summary>
        public string beginTime { get; set; }//
        /// <summary>
        /// 结束时间，6 byte
        /// </summary>
        public string endTime { get; set; }
        /// <summary>
        /// 数据密度间隔时间 1byte 见6.1.6.3
        /// </summary>
        public string m { get; set; }
    }




    /// <summary>
    /// 读取0D，集中器回复的单块数据域格式
    /// </summary>
    public class CDataWithTimeUpline
    {
        /// <summary>
        /// da 2 byte
        /// </summary>
        public string da { get; set; }//
        /// <summary>
        /// di 4 byte
        /// </summary>
        public string di { get; set; }//
        /// <summary>
        /// 数据内容
        /// </summary>
        public List<string> dataArray { get; set; }
        /// <summary>
        /// 数据时间6 bytes
        /// </summary>
        public List<string> timeArray { get; set; }
    }

    public class C0DData
    {
        /// <summary>
        /// da 2 byte
        /// </summary>
        public string da { get; set; }

        /// <summary>
        /// di 4 byte
        /// </summary>
        public string di { get; set; }

        /// <summary>
        /// 数据内容
        /// </summary>
        public string data { get; set; }

        /// <summary>
        /// 冻结时间
        /// </summary>
        public string time { get; set; }
    }
}
